﻿using Pattern24解释器模式.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern24解释器模式.Models
{
    /// <summary>
    /// 运动模式的解释器表达式
    /// </summary>
    public class ModeExpression : Expression
    {
        private string content;
        public ModeExpression(string content)
        {
            this.content = content;
        }

        public override string Interpret()
        {
            if (content == "move")
            {
                return "移动";
            }
            else if (content == "run")
            {
                return "快速移动";
            }
            else
            {
                return "模式错误";
            }
        }
    }
}
